#Kompiler Abkuerzung:

compile = gcc -c 

#main-Befehl, erstellt aus allen Object-Files eine ausfuehrbare Datei:

main: main.o menu.o singleplayer.o ki.o keyhandler.o collision.o options.o online.o server.o client.o  chat.o optionsmenu.o randombox.o burn.o name.o highscore.o audioeffects.o header/common.h
	gcc `sdl-config --cflags --libs` -lSDL_mixer -lSDL_ttf -o main main.o menu.o singleplayer.o ki.o keyhandler.o online.o server.o client.o collision.o options.o chat.o optionsmenu.o randombox.o burn.o name.o highscore.o audioeffects.o

#Liste der Befehle, um aus den C-Dateien Object-Files zu erstellen:

main.o: main.c header/common.h
	$(compile) main.c

menu.o: c-files/menu.c 
	$(compile) c-files/menu.c

singleplayer.o: c-files/singleplayer.c header/common.h 
	$(compile) c-files/singleplayer.c  

online.o: c-files/online.c header/common.h 
	$(compile) c-files/online.c

name.o: c-files/name.c header/common.h 
	$(compile) c-files/name.c

server.o: c-files/server.c header/common.h 
	$(compile) c-files/server.c

client.o: c-files/client.c header/common.h 
	$(compile) c-files/client.c

chat.o: c-files/chat.c header/common.h 
	$(compile) c-files/chat.c

ki.o: c-files/ki.c 
	$(compile) c-files/ki.c

keyhandler.o: c-files/keyhandler.c 
	$(compile) c-files/keyhandler.c

collision.o: c-files/collision.c 
	$(compile) c-files/collision.c

options.o: c-files/options.c 
	$(compile) c-files/options.c

optionsmenu.o: c-files/optionsmenu.c
		$(compile) c-files/optionsmenu.c

randombox.o: c-files/randombox.c
		$(compile) -pedantic -Wall c-files/randombox.c

burn.o: c-files/burn.c
		$(compile) -pedantic -Wall c-files/burn.c

highscore.o: c-files/highscore.c
		$(compile) -pedantic -Wall c-files/highscore.c

audioeffects.o: c-files/audioeffects.c
		$(compile) -pedantic -Wall c-files/audioeffects.c

#make clean Befehlsanweisung:

clean:
	-rm *.tmp *~ *.o header/*~ c-files/*~ c-files/#*
